package DAL.DTO;

public abstract class PersonneDTO {
        private String nom;
        private String prenom;
        private AdresseDTO adresse;
        private String telephone;
	private String email;

        public PersonneDTO( String nom, String prenom, String rue, String numero, 
                            int codePostal, String ville, String pays,
                            ZoneGeographiqueDTO zone, String telephone, String email) {
                super();
                setNom(nom);
                setPrenom(prenom);
                this.adresse = new AdresseDTO(  rue, numero, codePostal, ville, 
                                                pays, zone);
                setTelephone(telephone);
                setEmail(email);
        }

        //Setters
        public void setNom(String nom) {
                this.nom = nom;
        }

        public void setPrenom(String prenom) {
                this.prenom = prenom;
        }
    
        public void setAdresse(AdresseDTO adresse) {
                this.adresse = adresse;
        }

        public void setTelephone(String telephone) {
		UTIL.Util.checkString(telephone);
		this.telephone = telephone;
	}
        
	public void setEmail(String email) {
		UTIL.Util.checkString(email);
		this.email = email;
	}

        //Getters
        public synchronized String getNom() {
                return nom;
        }

        public String getPrenom() {
                return prenom;
        }
        
        public AdresseDTO getAdresse() {
                return adresse;
        }

        public String getTelephone() {
		return telephone;
	}        

        public String getEmail() {
		return email;
	}
}